package com.app.web;

import com.app.service.ActiveProducerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Created by xinjian.hu on 18-2-12.
 */
@Controller
public class ActiveController {
    @Autowired
    private ActiveProducerService activeProducerService;

    /**
     * 测试推送的方法
     */
    @RequestMapping("send")
    public void sendMessae() {
        String str = "我是要发送的消息";
        for (int i = 1; i <= 100; i++) {
            activeProducerService.sendMessage(str + i);
        }
    }
}
